class Solution {
public:
    bool isUnique(string s) {
        int ans = 0;
        int n = s.size();
        for (int i = 0; i < n; i++) {
            int x = s[i] - 'a';
            if (ans & (1 << x))return 0;
            ans |= (1 << x);
        }
        return 1;
    }
};